import React from 'react'
import { Routes, Route, Link, useRoutes } from 'react-router-dom'
import routes from './routes'

export default function App() {
  return (
    <div>
      <Link to="/home">首页</Link>
      &nbsp;&nbsp;
      <Link to="/login/1">登录页</Link>
      <hr />
      {/* 定义前端路由规则 */}
      {/* useRoutes的返回值就是根据路由表生成的Routes和Route */}
      {useRoutes(routes)}
    </div>
  )
}
